package com.xiangyi.teachingsystem.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xiangyi.teachingsystem.entity.po.PrivateRes;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface PrivateResMapper extends BaseMapper<PrivateRes> {
    @Select("SELECT pr.*,u.`name`,u.head_url\n" +
            "FROM private_res pr\n" +
            "LEFT JOIN `user` u\n" +
            "ON u.id=pr.user_id\n" +
            "WHERE pr.public_sign=1")
    List<PrivateRes> publicResList();
}
